﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ConsoleApp.Data;

namespace ConsoleApp
{
    public class RepositoryCart : IRepositoryCart
    {
        /// <summary>
        /// 
        /// </summary>
        private StandardsEntities db = new StandardsEntities();
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public IEnumerable<Cart> GetAll()
        {
            return db.Carts;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="cartId"></param>
        /// <returns></returns>
        public Cart Details(Guid cartId)
        {
            return db.Carts.SingleOrDefault(x => x.CartId == cartId);
        }
    }
}
